9 research outputs found

    Indexed realizability for bounded-time programming with references and type fixpoints

    Full text link
    The field of implicit complexity has recently produced several bounded-complexity programming languages. This kind of language allows to implement exactly the functions belonging to a certain complexity class. We here present a realizability semantics for a higher-order functional language based on a fragment of linear logic called LAL which characterizes the complexity class PTIME. This language features recursive types and higher-order store. Our realizability is based on biorthogonality, step-indexing and is moreover quantitative. This last feature enables us not only to derive a semantical proof of termination, but also to give bounds on the number of computational steps needed by typed programs to terminate

    The monitoring power of forcing program transformations

    Get PDF
    In this thesis, we are interested in semantical proofs of correctness results for complex programming languages. In particular, we advocate the need for a theoretical framework that allows one to:- design realizability semantics using basic blocks - use algebraic constructions to combine those blocks As a step towards this goal, we propose a new semantical framework, based on the composition of linear variants of Krivine realizability and Cohen forcing. The first ingredient of this framework is the Monitoring Abstract Machine: a computing environment that possesses special memory cells used to monitor the execution of programs, in the style of Miquel's KFAM. It is shown how this new machine emerges from a linear forcing program transformation. We then introduce the central notion of Monitoring Algebra and the associated realizability interpretation. Different monitoring algebras induce sound semantics of different programming languages. We then present an algebraic construction to combine different Monitoring Algebras (and the associated programming languages) based on the technique of forcing iteration. We present various results and first applications of our theory. We show that the forcing structure can be used to represent the consumption of resources, in particular time, but also step-indexing or the use of higher-order references. We finally apply our results to retrieve three complex soundness results:- we give the first semantical proof of the consistency of a contraction-free naive set theory, originally introduced by Grishin- we use our framework to obtain a polynomial time termination result for a light-logic based programming language featuring recursive types - we prove the soundness of a language with references that supports strong updates, based on a linear type system inspired by a work of Ahmed, Fluet and Morrisett.Dans cette thèse, nous nous intéressons aux preuves sémantiques de résultats de corrections pour des langages de programmation complexes. En particulier, nous mettons en évidencele besoin d'un nouveau cadre théorique permettant de:- concevoir des sémantiques de réalisabilité à partir de briques plus élémentaires.- combiner ces briques élémentaires grâce à des constructions algébriques.- prouver des théorèmes généraux réutilisables lors de preuves futures de correctionde langages de programmation. Nous proposons dans ce manuscrit un tel cadre sémantique, basé sur la composition de variantes linéaires de la réalisabilité de Krivine et du forcing de Cohen. Le premier ingrédient est la Monitoring Abstract Machine: un environnement de calcul qui utilise des cases mémoires réservées pour "surveiller" l'exécution des programmes, dans le style de la KFAM introduite par Miquel. Cette machine émerge naturellement d'une transformation de programme basée sur une variante linéaire du forcing de Cohen. Nous introduisons par la suite la notion centrale d'Algèbre de Monitoring et le modèle de réalisabilité associé. Chaque algèbre de monitoring induit une sémantique correcte pour un langage de programmation associé. Point crucial de cette thèse, nous définissons, en se basant sur la technique du forcing itéré, une construction algébrique permettant de combiner plusieurs algèbres de monitoring. Nous développons de nombreux résultats élémentaires à propos de notre théorie. En particulier, nous montrons que la structure de forcing peut être utilisée pour représenter la consommation de ressources (en particulier le temps), le step-indexing ou encore des références d'ordre supérieur. Finalement, nous appliquons notre théorie pour obtenir trois preuves de correction complexes:- nous donnons la première preuve sémantique connue de la cohérence d'une théorie des ensembles naïve sans contraction introduite originellement par Grishin dans les années 70- nous utilisons notre cadre pour obtenir un résultat de terminaison en temps polynomial pour un langage de programmation avec types récursifs basé sur une logique light- nous reprouvons la correction d'un langage avec références d'ordre supérieur et mise à jour forte, inspiré par un système de type introduit par Ahmed, Fluet et Morrisett

    Bidirectional Type Checking for Relational Properties

    Full text link
    Relational type systems have been designed for several applications including information flow, differential privacy, and cost analysis. In order to achieve the best results, these systems often use relational refinements and relational effects to maximally exploit the similarity in the structure of the two programs being compared. Relational type systems are appealing for relational properties because they deliver simpler and more precise verification than what could be derived from typing the two programs separately. However, relational type systems do not yet achieve the practical appeal of their non-relational counterpart, in part because of the lack of a general foundations for implementing them. In this paper, we take a step in this direction by developing bidirectional relational type checking for systems with relational refinements and effects. Our approach achieves the benefits of bidirectional type checking, in a relational setting. In particular, it significantly reduces the need for typing annotations through the combination of type checking and type inference. In order to highlight the foundational nature of our approach, we develop bidirectional versions of several relational type systems which incrementally combine many different components needed for expressive relational analysis.Comment: 14 page

    Church => Scott = Ptime: an application of resource sensitive realizability

    No full text
    We introduce a variant of linear logic with second order quantifiers and type fixpoints, both restricted to purely linear formulas. The Church encodings of binary words are typed by a standard non-linear type `Church,' while the Scott encodings (purely linear representations of words) are by a linear type `Scott.' We give a characterization of polynomial time functions, which is derived from (Leivant and Marion 93): a function is computable in polynomial time if and only if it can be represented by a term of type Church => Scott. To prove soundness, we employ a resource sensitive realizability technique developed by Hofmann and Dal Lago

    Backpropagation in the Simply Typed Lambda-Calculus with Linear Negation

    No full text
    International audienceBackpropagation is a classic automatic differentiation algorithm computing the gradient of functions specified by a certain class of simple, first-order programs, called computational graphs. It is a fundamental tool in several fields, most notably machine learning, where it is the key for efficiently training (deep) neural networks. Recent years have witnessed the quick growth of a research field called differentiable programming, the aim of which is to express computational graphs more synthetically and modularly by resorting to actual programming languages endowed with control flow operators and higher-order combinators, such as map and fold. In this paper, we extend the backpropagation algorithm to a paradigmatic example of such a programming language: we define a compositional program transformation from the simply-typed lambda-calculus to itself augmented with a notion of linear negation, and prove that this computes the gradient of the source program with the same efficiency as first-order backpropagation. The transformation is completely effect-free and thus provides a purely logical understanding of the dynamics of backpropagation
    corecore